import { IDestroy, IPoolable, IReset } from "../drongo-ts";
import { Entity } from "./Entity";
import { System } from "./System";
import { World } from "./World";




export interface IComponent extends IPoolable, IReset, IDestroy {

    /**
     * 所属世界
     */
    world: World;
    /**
     * 所属实体
     */
    entity: Entity;

    /**
     * 脏标记回调
     */
    dirtySignal: (() => void) | null;
    /**
     * 脏标记
     */
    markDirtied(): void;

    /**
     * 获取组件依赖的系统列表
     * @param result 
     */
    getDependencies(result: Array<new () => System>): void;
}